import request from '@/router/axios'
import {qianxiangType} from "../commonCheck";

export function getSwAuTvmSingleAssistList(query) {
  return request({
    url: '/check/check/getSwAuTvmSingleAssistList',
    method: 'post',
    params: query
  })
}

//一键替换单台设备回馈信息
export function setSwAuTvmSingleAssist(query) {
  return request({
    url: '/check/check/setSwAuTvmSingleAssist',
    method: 'post',
    params: query
  })
}

//单台设备下发协查
export function sendStatusSwAuTvmSingleAssist(query) {
  return request({
    url: '/check/check/sendStatusSwAuTvmSingleAssist',
    method: 'post',
    //params: query
    data: query
  })
}

//删除
export function delBatch(id) {
  return request({
    url: '/check/check/batchSingleDel' ,
    method: 'delete',
    data:id
  })
}

export function getMondifyData1(ob){
  let res=[];
  let one={};

    one.type="机电回馈";

    one.saleAmount=ob.saleAmount;
    one.replySaleMoney=ob.replySaleMoney;
    one.replySaleMoneyCY=one.saleAmount-one.replySaleMoney;
  
    one.depositAmount=ob.depositAmount;
    one.replyRechargeMoney=ob.replyRechargeMoney;
    one.replyRechargeMoneyCY=one.depositAmount-one.replyRechargeMoney;
  
    one.errorRefundAmount=ob.errorRefundAmount;
    one.replyErrorReturnMoney=ob.replyErrorReturnMoney;
    one.replyErrorReturnMoneyCY=one.errorRefundAmount-one.replyErrorReturnMoney;
  
    one.sumCY=one.replySaleMoneyCY+one.replyRechargeMoneyCY-one.replyErrorReturnMoneyCY;
  

    res.push(one);
    return res;
}

export const cols1=[{
  label: '系统',
  prop: "type",
  formslot: true,
},
  {
    label: '售卖金额',
    prop: "saleAmount",
    formslot: true,
  },
  {
    width:140,
    label: '协查售卖金额',
    prop: "replySaleMoney",
    formslot: true,
  },
  {
    width:140,
    label: '回馈后售卖差异',
    prop: "replySaleMoneyCY",
    hide: true,
    formslot: true,
  },
  {
    label: '充值金额',
    prop: "depositAmount",
    formslot: true,
  },
  {
    width:140,
    label: '协查充值金额',
    prop: "replyRechargeMoney",
    formslot: true,
  },

  {
    width:140,
    label: '回馈后充值差异',
    prop: "replyRechargeMoneyCY",
    formslot: true,
    hide: true,
  },
  {
    width:140,
    label: '故障退款金额',
    prop: "errorRefundAmount",
    formslot: true,
  },
  {
    width:180,
    label: '协查故障退款金额',
    prop: "replyErrorReturnMoney",
    formslot: true,
  },
  {
    width:140,
    label: '回馈后退款差异',
    prop: "replyErrorReturnMoneyCY",
    formslot: true,
    hide: true,
  },
  {
    width:180,
    label: '回馈后票款合计差异',
    prop: "sumCY",
    formslot: true,
    hide: true,
  }]